package com.rambo.baselib.httpapi;

import com.haibin.retrofit.Response;
import com.haibin.retrofit.call.Call;
import com.haibin.retrofit.net.Form;
import com.haibin.retrofit.net.GET;
import com.haibin.retrofit.net.Path;
import com.rambo.baselib.model.wanad.WanAdApiArticle;
import com.rambo.baselib.model.wanad.WanAdApiPage;
import com.rambo.baselib.model.wanad.WanAdApiResult;
import com.rambo.baselib.model.weather.WeatherApiResult;

import java.util.List;

/***********************************************************************
 * <p>@description: 和风天气API
 * <p>@author: rambo
 * <p>@version: 1.0.0
 * <p>@created on: 2022/1/18 13:50
 **********************************************************************/
public interface WeatherApiService {
    String KEY="您的KEY";
    //location=101010100 或 location=116.41,39.92 (英文逗号分隔的经度,纬度坐标)
    //当天实时天气 https://devapi.qweather.com/v7/weather/now?location=101010100&key=你的KEY

    @GET("v7/weather/now")
    Call<WeatherApiResult> getWeatherNow(@Form("location") String location, @Form("key") String key);

    //3天 天气https://devapi.qweather.com/v7/weather/3d?location=101010100&key=你的KEY
    @GET("v7/weather/3d")
    Call<WeatherApiResult> getWeather3d(@Form("location") String location, @Form("key") String key);

    //危害天气预警 https://devapi.qweather.com/v7/warning/now?location=101010100&key=你的KEY
    @GET("v7/warning/now")
    Call<WeatherApiResult> getWeatherWarn(@Form("location") String location, @Form("key") String key);
}
